
public class Player {

	private int shotAttempts;
	private int shotsMade;
	private String name;
	
	public Player(String name)
	{
		setShotAttempts(0);
		setShotsMade(0);
		this.setName(name);
	}

	public int getShotAttempts() {
		return shotAttempts;
	}

	public void setShotAttempts(int shotAttempts) {
		this.shotAttempts = shotAttempts;
	}

	public int getShotsMade() {
		return shotsMade;
	}

	public void setShotsMade(int shotsMade) {
		this.shotsMade = shotsMade;
	}
	
	public void addShotAttempt()
	{
		this.shotAttempts++;
	}
	
	public void minusShotAttempt()
	{
		this.shotAttempts--;
	}
	
	public void madeShot()
	{
		this.shotsMade++;
		this.shotAttempts++;
	}
	
	public double getShotPercentage()
	{
		return ((double)shotsMade/shotAttempts);
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
}
